<html><head><title>SetGadgetItemState</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">SetGadgetItemState()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#006666"><b>SetGadgetItemState</b></font>(#Gadget, Item, State)</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Changes the item state of the specified gadget. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Gadget</i></td>
<td width="90%"> 
The gadget to use. 

</td></tr>
<tr><td><i>Item</i></td>
<td> 
The item to use. The first item in the gadget has index 0. 

</td></tr>
<tr><td><i>State</i></td>
<td> 
The new state for the item. See below for the meaning of this parameter. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>
None.


</blockquote><p><b>Remarks</b></p><blockquote>

This is a universal function which works for almost all 
gadgets which handle several items. 'State' can take the following values: 
<br>
- <a href="calendargadget.html">CalendarGadget()</a>: <font color="#924B72">#PB_Calendar_Bold</font> to make a date appear bold, <font color="#924B72">#PB_Calendar_Normal</font> otherwise. 
<br>
- <a href="explorerlistgadget.html">ExplorerListGadget()</a>: with the following value: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_ListIcon_Selected</font> : The item should be selected.
</font></pre>
- <a href="listviewgadget.html">ListViewGadget()</a>: 1 if the item should be selected, 0 otherwise. 
<br>
- <a href="listicongadget.html">ListIconGadget()</a>: Combination of the following values: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_ListIcon_Selected</font> : The item should be selected.
  <font color="#924B72">#PB_ListIcon_Checked</font>  : The item should have its checkbox checked (<font color="#924B72">#PB_ListIcon_CheckBoxes</font> flag).
  <font color="#924B72">#PB_ListIcon_Inbetween</font>: The item should have its checkbox in the in between state (<font color="#924B72">#PB_ListIcon_ThreeState</font> flag).
</font></pre>
- <a href="treegadget.html">TreeGadget()</a>: Combination of the following values: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Tree_Selected</font> : The item should be selected.
  <font color="#924B72">#PB_Tree_Expanded</font> : The item should be expanded.
  <font color="#924B72">#PB_Tree_Collapsed</font>: The item should be collapsed. If neither <font color="#924B72">#PB_Tree_Expanded</font> nor <font color="#924B72">#PB_Tree_Collapsed</font> is set, this state will not be changed.
  <font color="#924B72">#PB_Tree_Checked</font>  : The items checkbox should be checked.
  <font color="#924B72">#PB_Tree_Inbetween</font>: The items checkbox should be in the in between state.
</font></pre>

<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">  SetGadgetItemState</font>(0, 1, <font color="#924B72">#PB_Tree_Expanded</font> | <font color="#924B72">#PB_Tree_Selected</font>) <font color="#006666">; The 2nd item is selected and expanded.</font>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="getgadgetitemstate.html">GetGadgetItemState()</a>, <a href="getgadgetstate.html">GetGadgetState()</a>, <a href="setgadgetstate.html">SetGadgetState()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=setgadgetitemimage.html>SetGadgetItemImage()</a> - <a href=index.html>Gadget Index</a> - <a href=setgadgetitemtext.html>SetGadgetItemText()</a> ->

</body></html>